package beans;

import java.util.ArrayList;
import java.util.List;

public class TaskStatusTypesBean {
	private List<TaskStatusTypesItemBean> taskStatusList = new ArrayList<TaskStatusTypesItemBean>();
	
	public void addRow(TaskStatusTypesItemBean taskStatusType) {
		taskStatusList.add(taskStatusType);
	}
	
	public String getJson() {
		StringBuffer sb = new StringBuffer();
		
		sb.append("{ ");
		sb.append("\"row\": [");
		for (int i = 0; i < taskStatusList.size(); i++) {
			sb.append(taskStatusList.get(i).getJson());
			if (i != taskStatusList.size() - 1) {
				sb.append(",");
			}
		}
		sb.append("]");
		sb.append("}");
		
		return sb.toString();
	}
}
